<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ include file="/views/teacher/js_css.jsp"%>
<title></title>

</head>
<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#" target="_parent">首页</a></li>
			<li><a href="#">培训安排</a></li>
		</ul>
	</div>
	<div class="rightinfo">
		<div class="tools">

			<ul class="toolbar">
				<li id="btn_addTrain"><span><img src="../images/t01.png" />
				</span>添加</li>
				<li id="delSelect"><span><img src="../images/t02.png" />
				</span>删除</li>
				<li><a href="update"><span><img
							src="../images/t03.png" /> </span>修改</a>
				</li>
				<li><a href="list"><span><img
							src="../images/t04.png" /> </span>统计</a>
				</li>
			</ul>


			<ul class="toolbar1">
				<li><span><img src="../images/t05.png" /> </span>设置</li>
			</ul>

		</div>

		<table class="tablelist">
			<thead style="background-color: #FFDCA9">
				<tr>
					<td style="width: 100px"><input type="checkbox" id="checkAll" />全/反选</td>
					<td style="width: 100px"><c:out value="Id"></c:out>
					</td>
					<td><c:out value="时间"></c:out>
					</td>
					<td><c:out value="培训负责人"></c:out>
					</td>
					<td><c:out value="操作"></c:out>
					</td>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${pager.list}" var="item" varStatus="status">
					<tr>
						<td><input type="checkbox" id="${item[0]}" name="subCheckBox" />
						</td>
						<td><c:out value="${item[0]}"></c:out></td>
						<td><c:out value="${item[1]}"></c:out>
						</td>
						<td><c:out value="${item[2]}"></c:out>
						</td>
						<td><a
							href="${ctx }/train/${item[0]}/delete?currentPage=${pager.pageControl.currentIndex}"
							class="tablelink"> 删除</a>&nbsp;
							 <a href="findStu" class="tablelink" id="editTrain">编辑</a>
							 <a href="findStu" class="tablelink">添加学员</a>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<!--在此制作页码的基本结构-->
		<div class="page">
			<c:if test="${pager.pageControl.sumPage!=0}" var="pageFlag">
				<a class="unaction">共计：${pager.pageControl.sumPage}页/${pager.pageControl.sumCount}条记录</a>
				<a href="${ctx }/train/list?currentPage=1">首页</a>
				<c:if test="${pager.pageControl.currentIndex==1}" var="fp">
					<a style="disabled:true" class="unaction">上一页</a>
				</c:if>
				<c:if test="${!fp}">
					<a
						href="${ctx }/train/list?currentPage=${pager.pageControl.currentIndex-1}">上一页</a>
				</c:if>

				<c:forEach begin="${pager.pageControl.minPage}" step="1"
					end="${pager.pageControl.maxPage}" var="index">

					<c:if test="${pager.pageControl.currentIndex==index}" var="t">
						<a class="active">${index}</a>
					</c:if>
					<c:if test="${!t}">
						<a href="${ctx }/train/list?currentPage=${index}">${index}</a>
					</c:if>
				</c:forEach>
				<a
					href="${ctx }/train/list?currentPage=${pager.pageControl.maxPage}">末页</a>

				<c:if
					test="${pager.pageControl.currentIndex==pager.pageControl.sumPage}"
					var="fp">
					<a style="disabled:true" class="unaction">下一页</a>
				</c:if>
				<c:if test="${!fp}">
					<a
						href="${ctx }/train/list?currentPage=${pager.pageControl.currentIndex+1}">下一页</a>
				</c:if>
			</c:if>
			<!-- 总页数是否为零  -->
			<c:if test="${!pageFlag}">
				<h1>没有记录</h1>

			</c:if>
		</div>
	</div>
	<div id="addModal" class="modal fade " tabindex="-1">
		<div class="modal-dialog">
			<!-- 内容声明 -->
			<div class="modal-content">
				<div class="modal-header">
					<button class="close" data-dismiss="modal">
						<span> &times; </span>
					</button>
					<h4 class="modal-title">培训安排制定</h4>
				</div>
				<div class="modal-body">
					<div class="container">
						<form id="defaultForm" method="post" class="form-horizontal">
							<div class="form-group">
								<label class="col-md-2 control-label">培训时间</label>
								<div class="col-md-4">
									<div class="input-group" id="datetimePicker">
										<input type="text" class="form-control" name="time" id="time" />
										<span class="input-group-addon"><span
											class="glyphicon glyphicon-calendar"></span> </span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">培训老师</label>
								<div class="col-md-4">
									<select id="tea" class="show-tick form-control selectpicker"
										data-live-search="true">
									</select>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button id="btn_submit" class="btn btn-warning">确定添加</button>
					<button class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>

		</div>
	</div>
	
	<div id="updModal" class="modal fade " tabindex="-1">
		<div class="modal-dialog">
			<!-- 内容声明 -->
			<div class="modal-content">
				<div class="modal-header">
					<button class="close" data-dismiss="modal">
						<span> &times; </span>
					</button>
					<h4 class="modal-title">培训安排制定</h4>
				</div>
				<div class="modal-body">
					<div class="container">
						<form id="defaultForm" method="post" class="form-horizontal">
							<div class="form-group">
								<label class="col-md-2 control-label">培训时间</label>
								<div class="col-md-4">
									<div class="input-group" id="datetimePicker">
										<input type="text" class="form-control" name="time" id="time" />
										<span class="input-group-addon"><span
											class="glyphicon glyphicon-calendar"></span> </span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label">培训老师</label>
								<div class="col-md-4">
									<select id="tea" class="show-tick form-control selectpicker"
										data-live-search="true">
									</select>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button id="btn_submit" class="btn btn-warning">保存</button>
					<button class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>

		</div>
	</div>
	<script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>
